package com.spring.authManage.pojo;

import com.spring.common.pojo.BaseForm;

/**
 * 资源信息
 * 
 * @author panzhengcai
 * @date 2014-7-7 下午5:07:46
 * @version 1.0
 */
public class ResourceInfo extends BaseForm {
	/**
	 * 
	 */
	private static final long serialVersionUID = -2002613467765296105L;

	private String id; //资源ID
	private String name; //资源名称
	private String roleId; //角色ID
	private String roleName; //角色名称
	private String memo; //资源描述
	private String url; //资源url
	private String type; //资源类型：1:URL\2:BUTTON\3:METHOD
	private String parentId; //父资源ID
	private String parentName; //父资源名称
	private String status; //是否有效
	private String updateTime; //资源更新时间
	private String updateUser; //资源更新操作人员
	private String orderNumber; //一级菜单排序号
	private String level; //菜单等级
	//扩展
	private String first_menu;//一级菜单
	private String second_menu;//二级菜单
	
	
	public String getFirst_menu() {
		return first_menu;
	}
	public void setFirst_menu(String first_menu) {
		this.first_menu = first_menu;
	}
	public String getSecond_menu() {
		return second_menu;
	}
	public void setSecond_menu(String second_menu) {
		this.second_menu = second_menu;
	}
	public String getId() {
		return id == null?"":id.trim();
	}
	public void setId(String id) {
		this.id = id == null?"":id.trim();
	}
	public String getName() {
		return name == null?"":name.trim();
	}
	public void setName(String name) {
		this.name = name == null?"":name.trim();;
	}
	public String getRoleId() {
		return roleId == null?"":roleId.trim();
	}
	public void setRoleId(String roleId) {
		this.roleId = roleId == null?"":roleId.trim();
	}
	public String getRoleName() {
		return roleName == null?"":roleName.trim();
	}
	public void setRoleName(String roleName) {
		this.roleName = roleName == null?"":roleName.trim();
	}
	public String getMemo() {
		return memo == null?"":memo.trim();
	}
	public void setMemo(String memo) {
		this.memo = memo == null?"":memo.trim();
	}
	public String getUrl() {
		return url == null?"":url.trim();
	}
	public void setUrl(String url) {
		this.url = url == null?"":url.trim();
	}
	public String getType() {
		return type == null?"":type.trim();
	}
	public void setType(String type) {
		this.type = type == null?"":type.trim();
	}
	public String getParentId() {
		return parentId == null?"":parentId.trim();
	}
	public void setParentId(String parentId) {
		this.parentId = parentId == null?"":parentId.trim();
	}
	public String getParentName() {
		return parentName == null?"":parentName.trim();
	}
	public void setParentName(String parentName) {
		this.parentName = parentName == null?"":parentName.trim();
	}
	public String getStatus() {
		return status == null?"":status.trim();
	}
	public void setStatus(String status) {
		this.status = status == null?"":status.trim();
	}
	public String getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}
	public String getUpdateUser() {
		return updateUser == null?"":updateUser.trim();
	}
	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser == null?"":updateUser.trim();
	}
	public String getOrderNumber() {
		return orderNumber == null?"":orderNumber.trim();
	}
	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber == null?"":orderNumber.trim();
	}
	public String getLevel() {
		return level == null?"":level.trim() ;
	}
	public void setLevel(String level) {
		this.level = level == null?"":level.trim();
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	public void obtainType(){
		if(this.getType().equals("")){
			setType("1");
		}else if (type.equals("on")){
			setType("2");
		}
	}
	
	public void obtainLevel(){
		if(this.getParentId().equals("-1")){
			setLevel("1");
		}else{
			setLevel("2");
		}
	}
	
	
}
